	.text
	.align	2
start:
	MOV r0, #matrix0
	MOV r1, #matrix1
	MOV r2, #matrix2
	MOV r13, #3
	MOV r3, #0
LOOP0:
	MOV r4, #0
LOOP1:
	MOV r5, #0
	MOV r6, #0
LOOP2:
	MUL r7, r3, r13
	ADD r7, r7, r5
	LDW r7, [r0+], r7 << #2
	MUL r8, r5, r13
	ADD r8, r8, r4
	LDW r8, [r1+], r8 << #2
	MULSL r9, r10, r7, r8
	ADD r6, r6, r9
	ADD r5, r5, #1
	CMPSUB.A r5, r13
	BSL LOOP2
	MUL r9, r3, r13
	ADD r9, r9, r4
	STW r6, [r2+], r9 << #2
	ADD r4, r4, #1
	CMPSUB.A r4, r13
	BSL LOOP1
	ADD r3, r3, #1
	CMPSUB.A r3, r13
	BSL LOOP0
	HLT
matrix0:
	.long 1
	.long 2
	.long 3
	.long 4
	.long 5
	.long 6
	.long 7
	.long 8
	.long 9
matrix1:
	.long 1
	.long -1
	.long 0
	.long -1
	.long 0
	.long 1
	.long 0
	.long 1
	.long -1
matrix2:
